]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ci: Include .desktop files in POTFILES check
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 20 Aug 2023 01:33:52 +0000 (03:33 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 22 Aug 2023 13:19:12 +0000 (15:19 +0200)
.desktop files always include translatable strings, so make sure
they are added to either POTFILES.in or POTFILES.skip.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2904>
(cherry picked from commit 168b306ffe2cd9a4cf6779451c81c8b426c6be28)

.gitlab-ci/check-potfiles.sh

index 82f101cf87458b6d59a95a557a29d309f01d5442..0969da180be9cfbd6c3f6fd5e06fc3588486f9d4 100755 (executable)
@@ -2,6 +2,7 @@
 
 srcdirs="src subprojects/extensions-tool"
 uidirs="js subprojects/extensions-app"
+desktopdirs="data subprojects/extensions-app/ subprojects/extensions-tool"
 
 # find source files that contain gettext keywords
 files=$(grep -lR --include='*.c' '\(gettext\|[^I_)]_\)(' $srcdirs)
@@ -9,6 +10,9 @@ files=$(grep -lR --include='*.c' '\(gettext\|[^I_)]_\)(' $srcdirs)
 # find ui files that contain translatable string
 files="$files "$(grep -lRi --include='*.ui' 'translatable="[ty1]' $uidirs)
 
+# find .desktop files
+files="$files "$(find $desktopdirs -name '*.desktop*')
+
 # filter out excluded files
 if [ -f po/POTFILES.skip ]; then
   files=$(for f in $files; do ! grep -q ^$f po/POTFILES.skip && echo $f; done)